Deklarace kurzoru

Otázka od: Pavel Hora

20. 7. 2004 20:19

Ahoj,
nevim proc, ale v FB 1.5 se mi nedari v procedure deklarovat cursor, co delam
spatne :

CREATE PROCEDURE jmeno AS
  DECLARE nazev CURSOR FOR SELECT polozka1, polozka2 FROM tabulka;
BEGIN
...


Odpovedá: Jerry

20. 7. 2004 20:41

Spis bych pristupoval ke kursoru takto :

CREATE PROCEDURE SP_GETJMENO
RETURNS (
    OUTTXT VARCHAR(255))
AS
DECLARE VARIABLE JMENO VARCHAR(20);
begin
    outtxt = "";
/*zde zacina kursor */
  for select a.jmeno from tb_jmena a into :JMENO do
    begin
        outtxt = outtxt || " " ||:jmeno;
    end
  suspend;
end

Testovano FireBird 1.5

Hezky den

Jaroslav Vorlicek


----- Original Message -----
From: "Pavel Hora" <phofficial@centrum.cz>
To: <delphi-l@clexpert.cz>
Sent: Tuesday, July 20, 2004 9:19 PM
Subject: Deklarace kurzoru


> Ahoj,
> nevim proc, ale v FB 1.5 se mi nedari v procedure deklarovat cursor, co
delam spatne :
>
> CREATE PROCEDURE jmeno AS
> DECLARE nazev CURSOR FOR SELECT polozka1, polozka2 FROM tabulka;
> BEGIN
> ...
>
>
>